Optimal. Leaf size=46 \[ \frac{x}{b}-\frac{\sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a+b} \tan (c+d x)}{\sqrt{a}}\right )}{b d \sqrt{a+b}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0747304, antiderivative size = 46, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.13, Rules used = {3171, 3181, 205} \[ \frac{x}{b}-\frac{\sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a+b} \tan (c+d x)}{\sqrt{a}}\right )}{b d \sqrt{a+b}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3171
Rule 3181
Rule 205
Rubi steps
\begin{align*} \int \frac{\sin ^2(c+d x)}{a+b \sin ^2(c+d x)} \, dx &=\frac{x}{b}-\frac{a \int \frac{1}{a+b \sin ^2(c+d x)} \, dx}{b}\\ &=\frac{x}{b}-\frac{a \operatorname{Subst}\left (\int \frac{1}{a+(a+b) x^2} \, dx,x,\tan (c+d x)\right )}{b d}\\ &=\frac{x}{b}-\frac{\sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a+b} \tan (c+d x)}{\sqrt{a}}\right )}{b \sqrt{a+b} d}\\ \end{align*}
Mathematica [A] time = 0.145377, size = 46, normalized size = 1. \[ \frac{-\frac{\sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a+b} \tan (c+d x)}{\sqrt{a}}\right )}{\sqrt{a+b}}+c+d x}{b d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.075, size = 50, normalized size = 1.1 \begin{align*}{\frac{\arctan \left ( \tan \left ( dx+c \right ) \right ) }{bd}}-{\frac{a}{bd}\arctan \left ({ \left ( a+b \right ) \tan \left ( dx+c \right ){\frac{1}{\sqrt{a \left ( a+b \right ) }}}} \right ){\frac{1}{\sqrt{a \left ( a+b \right ) }}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.85861, size = 617, normalized size = 13.41 \begin{align*} \left [\frac{4 \, d x + \sqrt{-\frac{a}{a + b}} \log \left (\frac{{\left (8 \, a^{2} + 8 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{4} - 2 \,{\left (4 \, a^{2} + 5 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{2} + 4 \,{\left ({\left (2 \, a^{2} + 3 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{3} -{\left (a^{2} + 2 \, a b + b^{2}\right )} \cos \left (d x + c\right )\right )} \sqrt{-\frac{a}{a + b}} \sin \left (d x + c\right ) + a^{2} + 2 \, a b + b^{2}}{b^{2} \cos \left (d x + c\right )^{4} - 2 \,{\left (a b + b^{2}\right )} \cos \left (d x + c\right )^{2} + a^{2} + 2 \, a b + b^{2}}\right )}{4 \, b d}, \frac{2 \, d x + \sqrt{\frac{a}{a + b}} \arctan \left (\frac{{\left ({\left (2 \, a + b\right )} \cos \left (d x + c\right )^{2} - a - b\right )} \sqrt{\frac{a}{a + b}}}{2 \, a \cos \left (d x + c\right ) \sin \left (d x + c\right )}\right )}{2 \, b d}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.19646, size = 109, normalized size = 2.37 \begin{align*} -\frac{\frac{{\left (\pi \left \lfloor \frac{d x + c}{\pi } + \frac{1}{2} \right \rfloor \mathrm{sgn}\left (2 \, a + 2 \, b\right ) + \arctan \left (\frac{a \tan \left (d x + c\right ) + b \tan \left (d x + c\right )}{\sqrt{a^{2} + a b}}\right )\right )} a}{\sqrt{a^{2} + a b} b} - \frac{d x + c}{b}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]